﻿using System;
using System.Collections.Generic;
using System.Text;


namespace IListNode
{
    public class Node
    {
        public int val;
        public IList<Node> children;

        public Node () { }

        public Node (int _val)
        {
            val = _val;
        }

        public Node (int _val, IList<Node> _children)
        {
            val = _val;
            children = _children;
        }
    }
    public class ListNode
    {
        public int val;
        public ListNode next;
        public ListNode (int x) { val = x; }
    }

    public class Display
    {
        public static void DisplayListNode(ListNode head)
        {
            while (head != null)
            {
                if (head.next == null) Console.Write ($"{head.val}");
                else Console.Write ($"{head.val} ->");
                head = head.next;
            }
            
        }
    }

    public class TreeNode
    {
        public int val;
        public TreeNode left;
        public TreeNode right;
        public TreeNode (int x) { val = x; }
    }

    public class GetTreeNode
    {
        private GetTreeNode _instance;

        public GetTreeNode SP
        {
            get {
                if (_instance == null) _instance = new GetTreeNode ();
                return _instance;
            }
        }


        //public TreeNode ROOT(string[] arr)
        //{

        //}
    }

}
